//
//  RouteShareTableCell.m
//  Cycling
//
//  Created by 迟国强 on 2023/4/5.
//

#import "RouteShareTableCell.h"

@interface RouteShareTableCell ()

@property (weak, nonatomic) IBOutlet UISwitch *facebookSharedSwitch;
@property (weak, nonatomic) IBOutlet UISwitch *routeSavedSwitch;


@end

@implementation RouteShareTableCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)faceSharedValueChanged:(id)sender {
    if(self.valueChangedBlock) {
        self.valueChangedBlock(0, self.facebookSharedSwitch.isOn);
    }
}

- (IBAction)routeSavedValueChanged:(id)sender {
    if(self.valueChangedBlock) {
        self.valueChangedBlock(1, self.routeSavedSwitch.isOn);
    }
}

- (void)setRouteSaved:(BOOL)routeSaved
{
    self.routeSavedSwitch.on = routeSaved;
}

- (void)setFacebookShared:(BOOL)facebookShared
{
    self.facebookSharedSwitch.on = facebookShared;
}

@end
